Instead of an arbitrary threshold, use one hundredth of the channel
authorMartin Nordholts <martinn@src.gnome.org>
Wed, 14 Jan 2009 19:39:56 +0000 (19:39 +0000)
committerMartin Nordholts <martinn@src.gnome.org>
Wed, 14 Jan 2009 19:39:56 +0000 (19:39 +0000)
* babl/babl.h (BABL_ALPHA_THRESHOLD): Instead of an arbitrary
threshold, use one hundredth of the channel intensity resolution
when using 16 bit integers i.e. 0.01 / (2^16 - 1).

svn path=/trunk/; revision=360

ChangeLog
babl/babl.h

index d96a0cd73b6772599c8e18dde1d5c8f24cecd9df..b526a9dbb74fb513b3828f43e5a9be8ae3b2bf5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-14  Martin Nordholts  <martinn@svn.gnome.org>
+
+       * babl/babl.h (BABL_ALPHA_THRESHOLD): Instead of an arbitrary
+       threshold, use one hundredth of the channel intensity resolution
+       when using 16 bit integers i.e. 0.01 / (2^16 - 1).
+
 2008-12-08  Martin Nordholts  <martinn@svn.gnome.org>
 
        * babl/babl-internal.h (babl_assert): Don't just eek when an
index 71d94c3dbcd3eb97ffbc056a37699b55c06a4259..1788d2f457e9192822f5fcd8192eae29450d14c6 100644 (file)
@@ -46,9 +46,11 @@ typedef struct _BablList BablList;
 #define BABL_MAGIC   0xbAb100
 
 /* Alpha threshold used in the reference implementation for
- * un-pre-multiplication of color data.
+ * un-pre-multiplication of color data:
+ *
+ * 0.01 / (2^16 - 1)
  */
-#define BABL_ALPHA_THRESHOLD 0.0001
+#define BABL_ALPHA_THRESHOLD 0.000000152590219
 
 enum {
   BABL_INSTANCE = BABL_MAGIC,